<?php error_reporting(E_ALL & ~E_NOTICE) ?>
<input 
    type="hidden" 
    value="<?php echo $item->cate_title ?>" 
    id="cate_title_curent" name="cate_title_curent"
    />
<form id="category_form_edit_panel" name="category_form_edit_panel" action="<?php echo base_url("admincp/excution") ?>" method="POST" 
      onsubmit="return false;" 
      target="integration_asynchronous" autocomplete="off" 
      >
    <div class="grid_12">
    <div id="category_edit_panel_tabs" class="jqx-hideborder" style="border-left: none;border-right: none;">
        <ul>
            <li style="margin-left: 3px">Basic</li>
            <li>Advanced</li>
        </ul>
        <div class="jqx-hideborder jqxPanel">
            <div class="p-12">
                

                <!--      title      -->
                <div class="p-r p-b-12">
                    <p>Title (*)</p>
                    <div class="p-r">
                        <input 
                            type="text" onblur="AliasTo('#cate_title','#cate_alias')"
                            class="w-i b-g-c-w validate[required]" 
                            value="<?php echo html_escape($item->cate_title) ?>" 
                            minlength="10"
                            maxlength="120" 
                            id="cate_title" name="cate_title"
                            />

                        <input 
                            type="hidden" 
                            value="<?php echo $item->cate_id ?>" 
                            id="cate_id" name="cate_id"
                            />
                    </div>
                </div>
                <div class="clear"></div>
                <!--      alias      -->
                <div class="p-r p-b-12">
                    <p><label class="d-p-b w-i" for="cate_alias">Alias (*)</label></p>
                    <div class="p-r">
                        <input 
                            type="text" 
                            class="w-i b-g-c-w validate[required,custom[alias]]" 
                            value="<?php echo html_escape($item->cate_alias) ?>" 
                            minlength="10"
                            maxlength="120" 
                            id="cate_alias" name="cate_alias"
                            />
                    </div>
                </div>
                <div class="clear"></div>
                <!--      parent      -->
                <div class="p-r p-b-12">
                    <p>Parent</p>
                    <div class="p-r b-g-c-w w-i">
                        
                        <select id="cate_parent" class="w-i p-a- t-0 l-0" name="cate_parent">
                            <option value="0">Root</option>
                            <?php
                            foreach ($category_list as $cat){
                                if($cat->cate_id==$item->cate_parent)
                                    echo "<option selected=\"1\" value=\"$cat->cate_id\">$cat->cate_display_title</option>";
                                else
                                    echo "<option value=\"$cat->cate_id\">$cat->cate_display_title</option>";
                            }
                            ?>
                        </select>
                    </div>
                    <p class="erc"></p>
                </div>
                <div class="clear"></div>
                <div class="p-r p-b-12- ">
                    <div class="colg_4">
                        <!--      birth      -->
                        <div class="p-r-2">
                            <div class="p-r">
                                <p><label class="d-p-b w-i" for="cate_position">Display position</label></p>
                                <input 
                                    type="text" data-putto="#gr-err-1" 
                                    class="w-i b-g-c-w validate[min[-99],max[99]]" 
                                    value="<?php echo $item->cate_position ?>" 
                                    minlength="7" min="-99" max="99"
                                    maxlength="20" 
                                    id="cate_position" name="cate_position"
                                    />
                            </div>
                        </div>
                    </div>
                    <div class="colg_4">
                        <!--      birth      -->
                        <div class="p-l-2 p-r-2">
                            <div class="p-r">
                                <p><label class="d-p-b w-i" for="cate_status">Status (*)</label></p>
                                <div class="p-r">
                                    <select id="cate_status" name="cate_status" class="w-i">
                                        <option <?php echo $item->cate_status=='false'?'selected=1':'' ?> value="false">Private</option>
                                        <option <?php echo $item->cate_status=='true'?'selected=1':'' ?> value="true">Public</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="colg_4">
                        <!--      year      -->
                        <div class="p-l-2">
                            <div class="p-r">
                                <p><label class="d-p-b w-i" for="cate_type">Type (*)</label></p>
                                <div class="p-r">
                                    <select id="cate_type" name="cate_type" class="w-i">
                                        <?php
                                        foreach ($CategoryType as $k=>$v){
                                            if($cat->cate_type==$k)
                                                echo "<option selected=\"1\" value=\"$k\">$v</option>";
                                            else
                                                echo "<option value=\"$k\">$v</option>";
                                        }
                                        ?>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <p id="gr-err-1" class="erb"></p>
                </div>
                <div class="clear"></div>
                
            </div>
            <div class="clear"></div>
        </div>
        <div class="jqx-hideborder jqxPanel">
            <div class="p-12">
                <div class="p-r p-b-12">
                    <p>Thumb</p>
                    <div class="p-r">
                        <input 
                            type="text"
                            class="w-i b-g-c-w" 
                            value="<?php echo html_escape($item->cate_thumb) ?>" 
                            minlength="10"
                            maxlength="120" 
                            id="cate_thumb" name="cate_thumb"
                            />
                        <span class="icon-16 more p-a t-4 r-0 c-s-p" title="Browse Images" onclick="BrowseServer('#cate_thumb')"></span>
                    </div>
                </div>
                <div class="clear"></div>
                <div class="p-r p-b-12">
                    <p>Link</p>
                    <div class="p-r">
                        <input 
                            type="text"
                            class="w-i b-g-c-w" 
                            value="<?php echo html_escape($item->cate_link) ?>" 
                            minlength="10"
                            maxlength="120" 
                            id="cate_link" name="cate_link"
                            />
                    </div>
                </div>
                <div class="clear"></div>
                <div class="p-r p-b-12">
                    <p>Taget</p>
                    <div class="p-r">
                        <select id="cate_target" name="cate_target" class="w-i">
                            
                        </select>
                    </div>
                </div>
                <div class="clear"></div>
                <div class="p-r p-b-12-">
                    <p>Description</p>
                    <div class="p-r">
                        <textarea id="cate_desc" name="cate_desc" class="w-i"><?php echo html_escape($item->cate_desc) ?></textarea>
                    </div>
                </div>
                <div class="clear"></div>
            </div><div class="clear"></div>
        </div>
    </div>
    <div class="p-r p-l-8 p-b-12 p-t-0 t-a-c">
        <button class="classic-button c-s-p" onclick="Categories.Save()">Save</button>
        <button class="classic-button c-s-p" onclick="Categories.Cancel()">Cancel</button>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
    </div>
</form>